package com.sd.repay.common;

/**
 * Created by sd on 2017/10/25.
 * 系统常量
 */
public class Constants {

    //设置连接超时时间，单位秒
    public static final int CONNECT_TIMEOUT = 60;
    //设置读取超时时间，单位秒
    public static final int READ_TIMEOUT = 120;
    //设置写的超时时间，单位秒
    public static final int WRITE_TIMEOUT = 60;

    //接口默认加密密钥
    public static final String SIGN_KEY = "jhrepaykeystr";
    //默认oem编号
    public static final String DEFAULT_OEM_TYPE = "default_repay";
    //默认账户类型（对私）
    public static final String DEFAULT_ACCOUNT_TYPE_PRIV = "1";
    //默认上级代理商编号
    public static final String DEFAULT_PARENT_AGENT_NO = "0";

    //全局分销开关
    public static final String WHOLE_DISTRIB_SWITCH_OPEN = "1";//开启
    public static final String WHOLE_DISTRIB_SWITCH_CLOSE = "0";//关闭

    //通道编码
    public static final String PAY_ACQ_CODE_CJ = "CJ";//畅捷
    public static final String CASH_ACQ_CODE_YUN = "YUN";//云账户

    //等级编码
    public static final String RANK_CODE_SILVER = "silver";//白银
    public static final String RANK_CODE_GOLD = "gold";//黄金
    public static final String RANK_CODE_PLATINUM = "platinum";//铂金
    public static final String RANK_CODE_DIAMONDS = "diamonds";//钻石

    //等级业务属性
    public static final String RANK_SERVICE_QUICK_FEE = "quickRepayFee";//快捷还款交易费率
    public static final String RANK_SERVICE_PERFECT_FEE = "perfectRepayFee";//快捷还款交易费率
    public static final String RANK_SERVICE_SINGLE_WITHDRAW = "singleWithdraw";//单笔提现手续费

    public static final String RANK_SERVICE_SHARE_MER_NUM = "needShareMerNumToPromote";//提升等级需要分享的商户数

    //激活码状态
    public static final String ACTIVATE_STATUS_DEPOT = "0";//入库
    public static final String ACTIVATE_STATUS_ALLOT = "1";//已分配
    public static final String ACTIVATE_STATUS_ACTIVE = "2";//已激活

    public static final String ACTIVATE_CAN_NOT_USE = "0";//不可使用
    public static final String ACTIVATE_CAN_USE = "1";//可使用

    //商户状态
    public static final String MERCHANT_STATUS_SUCCESS = "SUCCESS";//正常
    public static final String MERCHANT_STATUS_FREEZE = "FREEZE";//冻结，可交易，不可出账
    public static final String MERCHANT_STATUS_LOCK = "LOCK";//锁定，可登录，不可交易，不可出账
    public static final String MERCHANT_STATUS_CLOSE = "CLOSE";//关闭，不可登录，不可交易，不可出账，可恢复
    public static final String MERCHANT_STATUS_CANCLE = "CANCLE";//注销，不可登录，不可交易，不可出账，不可恢复

    //商户认证状态
    public static final String MER_AUTH_STATUS_PASS = "1";//已认证
    public static final String MER_AUTH_STATUS_NOT = "0";//未认证

    //代理商状态
    public static final String AGENT_STATUS_SUCCESS = "SUCCESS";//正常
    public static final String AGENT_STATUS_LOCK = "LOCK";//锁定，可登录，不可交易，不可出账
    public static final String AGENT_STATUS_CLOSE = "CLOSE";//关闭，不可登录，不可交易，不可出账，可恢复

    //商户类型
    public static final String MER_TYPE_MERCHANT = "M";
    public static final String MER_TYPE_AGENT = "A";
    public static final String MER_TYPE_PLAT = "PLAT";//平台

    public static final String PLAT_MER_NO = "SDKJ_PROFIT";//平台号

    //定时任务执行状态
    public static final String JOB_STATUS_RUNNING = "1";//开始
    public static final String JOB_STATUS_NOT_RUNNING = "0";//停止

    //定时任务是否允许并发
    public static final String JOB_CONCURRENT_IS = "1";//允许并发
    public static final String JOB_CONCURRENT_NOT = "0";//不允许并发

    //还款计划类型
    public static final String PLAN_DETAIL_TYPE_IN = "IN";//用户还款，即代付
    public static final String PLAN_DETAIL_TYPE_OUT = "OUT";//用户消费，即快捷支付

    //还款计划明细状态
    public static final String PLAN_DETAIL_STATUS_UN_EXECUTE = "0";//未执行
    public static final String PLAN_DETAIL_STATUS_IN_EXECUTE = "1";//执行中
    public static final String PLAN_DETAIL_STATUS_SUCCESS = "2";//成功
    public static final String PLAN_DETAIL_STATUS_FAIL = "3";//失败

    //还款计划状态
    public static final String PLAN_STATUS_INIT = "0";//初始化（还未生成还款明细）
    public static final String PLAN_STATUS_UN_EXECUTE = "1";//未执行
    public static final String PLAN_STATUS_IN_EXECUTE = "2";//还款中
    public static final String PLAN_STATUS_SUCCESS = "3";//还款成功
    public static final String PLAN_STATUS_FAIL = "4";//还款失败
    public static final String PLAN_STATUS_HANG = "5";//挂起
    public static final String PLAN_STATUS_STOP = "6";//终止
    public static final String PLAN_STATUS_OVERTIME = "7";//逾期

    //还款计划预处理状态
    public static final String PLAN_EXPECT_STATUS_STOP = "0";//终止

    // 还款计划清算状态
    public static final String PLAN_SETTLE_STATUS_UN_SETTLE = "0";//未清算
    public static final String PLAN_SETTLE_STATUS_SETTLED = "1";//已清算

    //还款计划最多可执行次数
    public static final int PLAN_MAX_EXECUTE_COUNT = 3;

    //统一出账记录状态
    public static final String WITHDRAW_STATUS_INIT = "0";//初始化
    public static final String WITHDRAW_STATUS_UNKNOW = "1";//出账中
    public static final String WITHDRAW_STATUS_SUCCESS = "2";//成功
    public static final String WITHDRAW_STATUS_FAIL = "3";//失败

    //还款项目出账类目
    public static final String WITHDRAW_SERVICE_REPAY = "repayPlan";//还款
    public static final String WITHDRAW_SERVICE_WITHDRAW = "extract";//余额提现

    //交易订单类型
    public static final String PAY_ORDER_SERVICE_REPAY = "repayPlan";//还款计划消费

    //订单交易状态
    public static final String ORDER_TRANS_STATUS_INIT = "0";//初始化
    public static final String ORDER_TRANS_STATUS_IN = "1";//交易中
    public static final String ORDER_TRANS_STATUS_SUCCESS = "2";//成功
    public static final String ORDER_TRANS_STATUS_FAIL = "3";//失败
    public static final String ORDER_TRANS_STATUS_UNKNOW = "4";//未知

    //卡类型
    public static final String CARD_TYPE_DEBIT = "DEBIT";//借记卡标识
    public static final String CARD_TYPE_CREDIT = "CREDIT";//信用卡标识
    public static final String CARD_TYPE_CFT = "CFT";//零钱

    //出款平台记录状态
    public static final String TRANSFER_STATUS_UN_SUBMIT = "0";//未提交
    public static final String TRANSFER_STATUS_SUBMIT_SUCCESS = "1";//提交成功
    public static final String TRANSFER_STATUS_SUBMIT_FAIL = "2";//提交失败
    public static final String TRANSFER_STATUS_TIMEOUT = "3";//超时
    public static final String TRANSFER_STATUS_SUCCESS = "4";//支付成功
    public static final String TRANSFER_STATUS_FAIL = "5";//支付失败
    public static final String TRANSFER_STATUS_UNKNOW = "6";//未知

    //证件类型
    public static final String ID_CARD = "01";//身份证

    //还款类型
    public static final String REPAY_TYPE_QUICK = "1";//快捷还款
    public static final String REPAY_TYPE_PERFECT = "2";//智能还款

    //收益类型
    public static final String PROFIT_SERVICE_QUICK_PAY = "1";//快捷还款交易分润
    public static final String PROFIT_SERVICE_PERFECT_PAY = "2";//智能还款交易分润
    public static final String PROFIT_SERVICE_DISTRIB_PAY = "3";//商户分销交易收益
    public static final String PROFIT_SERVICE_PLAT_PROFIT = "4";//平台分销交易收益

    //通知状态
    public static final String IS_NEED_NOTIFY = "1";//需要通知
    public static final String IS_NOT_NEED_NOTIFY = "0";//不需要通知

    //提现记录状态
    public static final String EXTRACT_STATUS_INIT = "0";//初始化
    public static final String EXTRACT_STATUS_IN = "1";//提现中
    public static final String EXTRACT_STATUS_SUCCESS = "2";//提现成功
    public static final String EXTRACT_STATUS_FAIL = "3";//提现失败

    public static final String EXTRACT_IS_REVERSE = "1";//需要冲正
    public static final String EXTRACT_IS_NOT_REVERSE = "0";//不需要冲正

    public static final String EXTRACT_REVERSE_SUCCESS = "1";//冲正成功
    public static final String EXTRACT_REVERSE_FAIL = "2";//冲正失败

    //分销状态
    public static final String IS_NEED_DISTRIB = "1";//需要分销
    public static final String IS_NOT_NEED_DISTRIB = "0";//不需要分销

    public static final String HAVE_NOT_DISTRIB = "0";//没有计算分销
    public static final String HAVE_DISTRIB = "1";//已计算分销

    //分润状态
    public static final String IS_NEED_PROFIT = "1";//需要分润
    public static final String IS_NOT_NEED_PROFIT = "0";//不需要分润

    public static final String HAVE_PROFIT = "1";//已计算分润
    public static final String HAVE_NOT_PROFIT = "0";//没有计算分润

    //平台收益状态
    public static final String IS_PLAT_PROFIT = "1";//需要平台收益
    public static final String IS_NOT_PLAT_PROFIT = "0";//不需要平台收益

    public static final String HAVE_PLAT_PROFIT = "1";//已计算平台收益
    public static final String HAVE_NOT_PLAT_PROFIT = "0";//没有计算平台收益

    public static final String ALLOW_INCOME_NEED = "1";//需要入账
    public static final String ALLOW_INCOME_NOT_NEED = "0";//不需要入账

    public static final String INCOME_STATUS_SUCC = "1";//是
    public static final String INCOME_STATUS_FAIL = "0";//否

    //用户余额常量
    public static final String BALANCE_CHANNEL_DAIFU = "DaiFu";//代付类型余额

    public static final String BALANCE_STATUS_SUCCESS = "1";//余额正常
    public static final String BALANCE_STATUS_LOCK = "0";//余额锁定

    public static final String BALANCE_HIS_TRANS_TYPE_IN = "IN";//入账
    public static final String BALANCE_HIS_TRANS_TYPE_OUT = "OUT";//出账

    public static final String BALANCE_HIS_TYPE_CURR = "curr_balance";//今日余额
    public static final String BALANCE_HIS_TYPE_HIS = "his_balance";//历史余额
    public static final String BALANCE_HIS_TYPE_FREEZE = "freeze_balance";//冻结金额

    public static final String BALANCE_HIS_SERVICE_TRADE = "0";//分销
    public static final String BALANCE_HIS_SERVICE_CASH = "1";//提现
    public static final String BALANCE_HIS_SERVICE_REVERSE = "2";//冲正
    public static final String BALANCE_HIS_SERVICE_ADJUST = "3";//调账
    public static final String BALANCE_HIS_SERVICE_PROFIT = "4";//分润

    public static final String BALANCE_HIS_STATUS_INIT = "0";//初始化
    public static final String BALANCE_HIS_STATUS_SUCCESS = "1";//成功
    public static final String BALANCE_HIS_STATUS_FAIL = "2";//失败

    //冲正状态
    public static final String REVERSE_STATUS_INIT = "0";//初始化
    public static final String REVERSE_STATUS_SUCCESS = "1";//成功
    public static final String REVERSE_STATUS_FAIL = "2";//失败
    public static final String REVERSE_STATUS_UNKNOW = "3";//未知

    //客户端版本是否最新版
    public static final String CLIENT_VERSION_IS_NEW = "1";//是
    public static final String CLIENT_VERSION_NOT_NEW = "0";//否

    //客户端更新标识
    public static final String CLIENT_VERSION_DOWN_UN = "0";//无需更新
    public static final String CLIENT_VERSION_DOWN_MUST = "1";//必须更新
    public static final String CLIENT_VERSION_DOWN_OR = "2";//建议更新

    public static final String CLIENT_CAPTCHA_KEY = "CLIENT_CAPTCHA_KEY";

    //实名认证常量
    public static final String AUTH_CHANNEL_SONGH = "songh";//认证渠道编号

    public static final String AUTH_TYPE_TWO = "2";//二要素认证
    public static final String AUTH_TYPE_THREE = "3";//三要素认证
    public static final String AUTH_TYPE_FOUR = "4";//四要素认证

    public static final String AUTH_STATUS_UNAUTH = "0";//未认证
    public static final String AUTH_STATUS_SUCCESS = "1";//认证成功
    public static final String AUTH_STATUS_FAIL = "2";//认证失败

    //卡片是否设置计划
    public static final String CARD_IS_PLAN = "1";
    public static final String CARD_NO_PLAN = "0";

    //发送短信验证码业务类型
    public static final String SMS_BUSINESS_MERCHANT_REG = "MERCHANT_REG";
    public static final String SMS_BUSINESS_FIND_LOGINPWD = "FIND_LOGINPWD";
    public static final String SMS_BUSINESS_CARD_UPDATE = "CARD_UPDATE";
    public static final String SMS_BUSINESS_CARD_MANAGE = "CARD_MANAGE";
    public static final String SMS_BUSINESS_MERCHANT_CASH = "MERCHANT_CASH";

    public static final String SMS_VALI_STATUS_NOT = "1";//未验证
    public static final String SMS_VALI_STATUS_PASS = "2";//验证通过
    public static final String SMS_VALI_STATUS_INVALID = "３";//废弃

    //系统来源
    public static final String SYSTEM_SOURCE_CLIENT = "CLIENT";
    public static final String SYSTEM_SOURCE_BOSS = "BOSS";

    //直清商户信息
    public static final String ZQ_MER_STATUS_SUCC = "1";
    public static final String ZQ_MER_STATUS_FAIL = "2";

    public static final String ZQ_MER_EFFECTIVE_STATUS_FAIL = "0";
    public static final String ZQ_MER_EFFECTIVE_STATUS_SUCC = "1";


}
